package com.yanxibao.util;

import com.yanxibao.dto.UserDTO;

public class UserHolder {
    private static final ThreadLocal<UserDTO> us = new ThreadLocal<>();

    public static void saveUser(UserDTO userDTO) {
        us.set(userDTO);
    }

    public static UserDTO getUser() {
        return us.get();
    }

    public static void removeUser() {
        us.remove();
    }
}
